package com.example.carrierapp.viewmodel.itemmodel

import android.databinding.BaseObservable
import android.graphics.Color
import android.view.View
import com.example.carrierapp.config.mStartActivity
import com.example.carrierapp.ui.main.dispatch.detail.DispatchSomeActivity

class ItemDispatchHistoryModel : BaseObservable() {

    var shipmentId  = 0
    var id = 0
    var driverName = ""
    var driverPhone = ""
    var carNumber = ""
    var billState = 0
    var billStateName = ""
    var proName = ""
    var proPicPath = ""
    var schedulingNum = 0f
    var loadingNum = 0f
    var unloadingNum = 0f

    var shouNum = 0f
        get() = when (billState) {
            1 -> schedulingNum
            2 -> loadingNum
            else -> unloadingNum
        }

    var statusColor = 0
        get() = when (billState) {
            1 -> Color.parseColor("#FF6C40")
            2 -> Color.parseColor("#FF8D1E")
            3 -> Color.parseColor("#2ECC71")
            else -> Color.parseColor("#999999")
        }
}